#include "Bonus.h"

CBonus::CBonus(void)
{
}

CBonus::~CBonus(void)
{
}

int CBonus::Draw()
{
	glPushMatrix();

	SetupMatrices();

	GLfloat GreenSurface[] = { 1.0f, 0.0f, 0.0f, 1.0f};
	glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, GreenSurface);
	glBegin(GL_QUADS);
	/* przednia sciana */
	glNormal3d( 0.0, 0.0, -1.0);
//	glColor3d(0.0, 1.0,0.0);
	glTexCoord2d(0.0f, 0.0f);	glVertex3d( -0.45, -0.45, -0.45);
	glTexCoord2d(0.0f, 1.0f);	glVertex3d( -0.45, 0.45, -0.45);
	glTexCoord2d(1.0f, 1.0f);	glVertex3d( 0.45, 0.45, -0.45);
	glTexCoord2d(1.0f, 0.0f);	glVertex3d( 0.45, -0.45, -0.45);

	/* tylna sciana */
	glNormal3d( 0.0, 0.0, 1.0);
	glTexCoord2d(0.0f, 0.0f);	glVertex3d( -0.45, -0.45, 0.45);
	glTexCoord2d(0.0f, 1.0f);	glVertex3d( -0.45, 0.45, 0.45);
	glTexCoord2d(1.0f, 1.0f);	glVertex3d( 0.45, 0.45, 0.45);
	glTexCoord2d(1.0f, 0.0f);	glVertex3d( 0.45, -0.45, 0.45);

	/* gorna sciana */
	glNormal3d( 0.0, 1.0, 0.0);
	glTexCoord2d(0.0f, 0.0f);	glVertex3d( -0.45, 0.45, -0.45);
	glTexCoord2d(0.0f, 1.0f);	glVertex3d( -0.45, 0.45, 0.45);
	glTexCoord2d(1.0f, 1.0f);	glVertex3d( 0.45, 0.45, 0.45);
	glTexCoord2d(1.0f, 0.0f);	glVertex3d( 0.45, 0.45, -0.45);

	/* dolna sciana */
	glNormal3d( 0.0, -1.0, 0.0);
	glTexCoord2d(0.0f, 0.0f);	glVertex3d( -0.45, -0.45, -0.45);
	glTexCoord2d(0.0f, 1.0f);	glVertex3d( -0.45, -0.45, 0.45);
	glTexCoord2d(1.0f, 1.0f);	glVertex3d( 0.45, -0.45, 0.45);
	glTexCoord2d(1.0f, 0.0f);	glVertex3d( 0.45, -0.45, -0.45);
	
	/* lewa boczna sciana */
	glNormal3d( -0.0, 0.0, 0.0);
	glTexCoord2d(0.0f, 0.0f);	glVertex3d( -0.45, -0.45, -0.45);
	glTexCoord2d(0.0f, 1.0f);	glVertex3d( -0.45, 0.45, -0.45);
	glTexCoord2d(1.0f, 1.0f);	glVertex3d( -0.45, 0.45, 0.45);
	glTexCoord2d(1.0f, 0.0f);	glVertex3d( -0.45, -0.45, 0.45);

	/* prawa boczna sciana */
	glNormal3d( 0.0, 0.0, 0.0);
	glTexCoord2d(0.0f, 0.0f);	glVertex3d( 0.45, -0.45, -0.45);
	glTexCoord2d(0.0f, 1.0f);	glVertex3d( 0.45, -0.45, 0.45);
	glTexCoord2d(1.0f, 1.0f);	glVertex3d( 0.45, 0.45, 0.45);
	glTexCoord2d(1.0f, 0.0f);	glVertex3d( 0.45, 0.45, -0.45);

	glEnd();

	glPopMatrix();

	return 0;
}

int CBonus::Update()
{
	return 0;
}
